<?php
# http://projects:8081/cdapp-2kt-api/api/set_seat_frequency.php
include_once '_portal.php';

$seat = $_GET['seat'];
$frequency = $_GET['frequency'];
if (!$frequency || $frequency == '' || !$seat || $seat == '') {
  die;
}
$sql1 = "UPDATE `2kt_seat_status` SET `frequency`= NULL WHERE `frequency`='{$frequency}'";
exec_sql($sql1);

$sql2 = "UPDATE `2kt_seat_status` SET `frequency`='{$frequency}' WHERE `seatName`='{$seat}'";
exec_sql($sql2);

output(['sql1' => $sql1, 'sql2' => $sql2]);
